Xceed DataGrid for Silverlight Documentation
InverseBooleanConverter Class
Imports System.Windows.Data
Imports System
 
 
 
Namespace Xceed.Silverlight.Documentation
  Public Class InverseBooleanConverter
                     Implements IValueConverter
    Public Function Convert( ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo ) As Object Implements IValueConverter.Convert
      If TypeOf value Is Boolean Then
        Return Not CBool( value )
      End If
 
 
 
      Return value
    End Function
 
 
 
    Public Function ConvertBack( ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo ) As Object Implements IValueConverter.ConvertBack
      If TypeOf value Is Boolean Then
        Return Not CBool( value )
      End If
 
 
 
      Return value
    End Function
  End Class
End Namespace
using System.Windows.Data;
using System;
 
 
 
namespace Xceed.Silverlight.Documentation
{
  public class InverseBooleanConverter : IValueConverter
  {
    public object Convert( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
    {
      if( value is bool )
        return !( bool )value;
 
 
 
      return value;
    }
 
 
 
    public object ConvertBack( object value, Type targetType, object parameter, System.Globalization.CultureInfo culture )
    {
      if( value is bool )
        return !( bool )value;
 
 
 
      return value;
    }
  }
}
Send Feedback